package cn.thoughtworks.school.usercenter.entities;

import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

@Setter
@Getter
public class App {
  private String name;
  private String link;
  private String icon;
  private List<App> apps = new ArrayList<>();

  public App() {
    initApps();
  }

  public App(String name, String link, String icon) {
    this.name = name;
    this.link = link;
    this.icon = icon;
  }

  private void initApps() {
    apps.add(new App("训练营-学员", "/program-center/student/index.html", "folder"));
    apps.add(new App("成长日志", "/practise-diary/index.html", "star"));
  }

  public void addProgramDesignApp() {
    apps.add(new App("训练营设计", "/program-center/instructor/index.html", "credit-card"));
  }

  public void addQuizApp() {
    apps.add(new App("题库", "/quiz-center/index.html", "folder-open"));
  }

  public void addBBSApp() {
    apps.add(new App("学习平台论坛", "/../bbs/login", "tags"));
  }

  public void addUserManagementApp() {
    apps.add(new App("用户权限管理", "/admin/index.html", "key"));
  }

  public void addOrganizationApp() {
    apps.add(new App("组织管理", "/organizations/index.html", "ellipsis"));
  }

  public void addTimerTaskApp() {
    apps.add(new App("定时提醒管理", "/timer-center/index.html", "file-sync"));
  }

  public void addProgramTutorApp() {
    apps.add(new App("训练营-助教", "/program-center/tutor/index.html", "book"));
  }
}
